CouchDB Push
Deploy CouchDB documents from directory, JSON or CommonJS module.
Via API or command line client.
API
push(url, source[, options], callback)
url
- URL to a CouchDB database. Auth URLs are OK. See nanos configuration, as this argument is
directly passed to nano.source
- Can be a Couchapp Directory Tree, JSON file or CommonJS/Node module. Please see couchdb-compile for in depth information about source handling.options.multipart
- if set to true
, attachments are saved via multipart api.callback
- called when done with two arguments: error
and response
.
Example
var push = require('couchdb-push');
push('http://localhost:5984/my-app', 'project/couchdb', function(err, resp) {
});
CLI
couchdb-push URL [SOURCE]
When SOURCE
is omitted, the current directory will be used.
options.multipart
is always set to true.
Example
couchdb-push http://localhost:5984/my-app project/couchdb
Tests
npm test
(c) 2014 Johannes J. Schmidt, TF
MIT License